import request from '@/utils/request'

const api_name = '/product/categorybrandrelation'

export default {
    
    getDataList(params) {
        return request({
            url: `${api_name}/list`,
            method: 'get',
            params: params
        })
    },
    
    //根据分类ID，获取所有品牌信息
    getBrandList(params) {
        return request({
            url: `${api_name}/brands`,
            method: 'get',
            params: params
        })
    },
    createRelation(data) {
        return request({
          url: `${api_name}/create`,
          method: 'post',
          data: data
        })
    },

    deleteRelation(data) {
        return request({
          url: `${api_name}/delete`,
          method: 'delete',
          params: data
        })
    },
}
